<!DOCTYPE html>
<html>

<head>

	<meta charset="utf-8" />
	<title>国风汉服-商品详情</title>
	<!--导入核心文件-->
	<script src="../bootstrap3/js/holder.js"></script>
	<link href="../bootstrap3/css/bootstrap.css" rel="stylesheet" type="text/css">
	<script src="../bootstrap3/jquery-1.9.1.min.js"></script>
	<script src="../bootstrap3/js/bootstrap.js"></script>
	<script src="../bootstrap3/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<!-- 字体图标 -->
	<link rel="stylesheet" href="../bootstrap3/font-awesome-4.7.0/css/font-awesome.css" />

	<link rel="stylesheet" type="text/css" href="../css/product.css" />
	<link rel="stylesheet" type="text/css" href="../css/imgmove.css" />
	<link rel="stylesheet" type="text/css" href="../css/aaa.css" />
	<script src="../js/product.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/imgmove.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
<!--头部-->
<div class="s_nav">
	<div class="s_nav_box">
		<a class="s_logo photo" href="../index.html"></a>
		<nav class="s_nav_menu">
			<a class="default active" href="/">首页</a> <a class="album"
														 href="album.html">摄影</a> <a class="video" href="/video">视频</a> <a
				class="topic" href="/topic">问答</a> <a class="word" href="/word">文章</a>
			<a class="activity" href="/game">活动</a> <a class="gou"
													   href="han_shopmall.html">商城</a>
		</nav>
		<div class="def_search  header_user">

			<div class="user">
				<img class="head" id="myavatar"
					 src="https://pic.hanfugou.com/web/2018/11/20/11/2e3e6efa17ba4116941bd3d176ddc8df.jpeg_50x50.jpg">
				<nav class="dropdown_menu">
					<a class="item letter" href="password.html" target="im"> <i
							class="icon"></i>修改密码
					</a> <a class="item auth" href="userdata.html"> <i class="icon"></i>个人资料
				</a> <a href="upload.html" id="aUMain" class="item usermain"> <i
						class="icon"></i>上传头像
				</a> <a class="item tools" href="address.html"> <i class="icon"></i>收货管理
				</a> <a class="item exit" href="login.html"><i class="icon"></i>退出
				</a>
				</nav>
			</div>
			<a href="cart.html">购物车<span class="messcount"></span>
			</a>

			<div class="appdown">
				APP下载
				<div class="appdownload">
					<div class="appdownload_btn">
						<a class="ios"
						   href="https://itunes.apple.com/cn/app/id1065807878"
						   target="_blank">iPhone下载</a> <a class="android"
														   href="https://www.hanfuhui.cn/download" target="_blank">Android下载</a>
					</div>
					<img id="img-avatar" src="../image/2e3e6efa17ba4116941bd3d176ddc8df.jpeg_100x100.jpg" alt="">
				</div>
			</div>
			<a class="search_btn" onclick="location.href='/search'"></a>
		</div>
	</div>
</div>
<!--头部结束-->
<!--导航 -->
<!--分割导航和顶部-->
<div class="clearfix"></div>
<hr />

<div class="container">
<div class="col-md-12 top-nav">

	<div class="col-md-6">
		<ul class="nav nav-pills">
			<li>
				<a href="#"></a>
			</li>
			<li class="active"><a href="../../../index.html"><span
					class="fa fa-home"></span></a></li>
			<li><a class="gou" href="han_shopmall.html">商城</a></li>
			<li><a href="cart.html">购物车</a></li>
			<li><a href="news.html">资讯</a></li>
			<li><a href="culture.html">文化</a></li>
		</ul>

	</div>
	<div class="col-md-5">

		<form action="shopmall_in.html" class="form-inline" role="form" style="float: right;">
			<div class="form-group">
				<input type="text" class="form-control" id="search" name="search" placeholder="请输入商品名称进行搜索">
			</div>

			<button type="submit" class="btn btn-default btn-sm"><span class="fa fa-search"></span></button>
		</form>

	</div>
</div>
<!--导航结束-->

<!--商品信息展示开始-->

<div class="col-md-offset-1 col-md-10">
	<div class="col-md-6">

		<!--<div class="img-big col-md-12">-->
		<img  src="../mall_image/webp(10)" id="big_img" class="img-big" alt="丹墨  观其赋原创传统汉服女 立领琵琶袖上襦 一片式穿孔下裙">
		<!--</div>-->
	</div>

	<div class="col-md-6">
		<h3 id="goods-title" class="col-md-12">丹墨 观其赋原创传统汉服女 立领琵琶袖上襦 一片式穿孔下裙</h3>
		<h4 class="col-md-12 text-row-1"><small id="goods-sell-point">丹墨</small></h4>
		<h4 class="col-md-12 text-row-1"><small id="goods-else-price">邮费：省内包邮！预购从速！</small></h4>
		<div class="col-md-12 price-bar">
			<small>心动售价：</small> ¥<span id="goods-price">4899</span>.00
			<div><small>*退货补运费 *7天无理由退货 *24小时快速退款 </small></div>
		</div>
		<form class="form-inline product-form col-md-12" role="form">
			<div class="col-md-12 form-space">
				<label for="num">数量：</label>
				<input id="numDown" type="button" value="-" class="num-btn" />
				<input id="num" type="text" size="2" readonly="readonly" class="num-text" value="1">
				<input  id="numUp"class="num-btn" type="button" value="+" />
			</div>
			<div class="col-md-12 form-space">
				<h4><small><b>国风汉服</b>发货并提供售后服务,今日下单,明日送达</small></h4>

			</div>
			<div class="col-md-12 form-space">

				<input class="btn btn-primary btn-lg btn-block" type="button" value="立即购买">

			</div>

			<div class="col-md-12 form-space">

				<button id="btn-add-to-cart" type="button" class="btn btn-default go-cart"><span class="fa fa-cart-plus"></span> 加入购物车</button>

				<button type="button" class="btn btn-default"><span class="fa fa-heart-o"></span> 加入收藏</button>

			</div>
		</form>

	</div>
</div>
</div>
<!--商品信息展示结束-->
<!--商品其他信息开始-->
<div class="container">
<div class="col-md-offset-1 col-md-10">
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">售后保障</h3>
		</div>
		<div class="panel-body ">
			<div class="col-md-12 ">
				<div class="col-md-1 saled-icon"><span class="fa fa-shield"></span></div>
				<div class="col-md-11 saled-title">正品保障</div>
			</div>
			<div class="col-md-12 ">
				<div class="col-md-offset-1 col-md-11 saled-content">国风汉服向您保证所售商品均为正品行货，国风汉服自营商品开具机打发票或电子发票。</div>
			</div>

			<div class="col-md-12 ">
				<div class="col-md-1 saled-icon"><span class="fa fa-wrench"></span></div>
				<div class="col-md-11 saled-title">厂家服务</div>
			</div>
			<div class="col-md-12 ">
				<div class="col-md-offset-1 col-md-11 saled-content">本产品全国联保，享受三包服务，质保期为：二年质保</div>
			</div>

			<div class="col-md-12 ">
				<div class="col-md-1 saled-icon"><span class="fa fa-heartbeat"></span></div>
				<div class="col-md-11 saled-title">郑重承诺</div>
			</div>
			<div class="col-md-12 ">
				<div class="col-md-offset-1 col-md-11 saled-content">国风汉服销售并发货的商品，由国风汉服提供发票和相应的售后服务。请您放心购买！
					<br /> 注：因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件，本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货！并且保证与当时市场上同样主流新品一致。若本商城没有及时更新，请大家谅解！
				</div>
			</div>

			<div class="col-md-12 ">
				<div class="col-md-1 saled-icon"><span class="fa fa-globe"></span></div>
				<div class="col-md-11 saled-title">全国联保</div>
			</div>
			<div class="col-md-12 ">
				<div class="col-md-offset-1 col-md-11 saled-content">
					凭质保证书及国风汉服发票，可享受全国联保服务（奢侈品、钟表除外；奢侈品、钟表由国风汉服联系保修，享受法定三包售后服务），与您亲临商场选购的商品享受相同的质量保证。国风汉服还为您提供具有竞争力的商品价格和运费政策，请您放心购买！
					<br /> 注：因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件，本司不能确保客户收到的货物与商城图片、产地、附件说明完全一致。只能确保为原厂正货！并且保证与当时市场上同样主流新品一致。若本商城没有及时更新，请大家谅解！

				</div>
			</div>

			<div class="col-md-12 ">
				<div class="col-md-1 saled-icon"><span class="fa fa-reply"></span></div>
				<div class="col-md-11 saled-title">无忧退货</div>
			</div>
			<div class="col-md-12 ">
				<div class="col-md-offset-1 col-md-11 saled-content">客户购买国风汉服商品7日内（含7日，自客户收到商品之日起计算），在保证商品完好的前提下，可无理由退货。（部分商品除外，详情请见各商品细则）</div>
			</div>

			<div class="col-md-12 saled-content">

				<small><b>权利声明：</b><br />
					所有商品信息、商品咨询等内容，是国风汉服重要的经营资源，未经许可，禁止非法转载使用。<br />
					注：本站商品信息均来自于合作方，其真实性、准确性和合法性由信息拥有者（合作方）负责。本站不提供任何保证，并不承担任何法律责任。</small>
			</div>
		</div>
	</div>
</div>
</div>

<!--页脚开始-->
<!--底部-->
<footer style="text-align: center;">
	<p>
		<a href="/" target="_blank">关于我们</a><i>|</i><a href="/"
													   target="_blank">商家入驻</a><i>|</i><a href="/" target="_blank">入驻协议</a><i>|</i><a
			href="#" target="_blank">新手指南</a><i>|</i><a
			href="/copyright/?action=cooperation" target="_blank">商务合作</a><i>|</i><a
			href="" target="_blank">汉服荟</a>
	</p>
	<p class="copyright">
		<a href="/" class="ebs" target="_blank"></a>CopyRight ©2018
		珠海市达内汉服网络科技有限公司 版权所有 <a href="" target="_blank">粤ICP备14084884号-1</a>
		电话：0888-8888888
	</p>
</footer>
<!--页脚结束-->
<script type="text/javascript" src="../js/jquery-getUrlParam.js"></script>
<script type="text/javascript">
    // 当前页面处理的商品的id
    var id;
    $(document).ready(function() {
        //获取头像
        if ($.cookie("avatar") != null) {
            var c=$.cookie("avatar");
            console.log(c);
            $("#img-avatar").attr("src", $.cookie("avatar"));
            $("#myavatar").attr("src", $.cookie("avatar"));
        }
        // 获取url中的id
        id = $.getUrlParam("id");
        // 显示商品详情
        showGoodsDetails(id);
    });

    function showGoodsDetails(id) {
        var url = "../goods/details/" + id;
        $.ajax({
            "url": url,
            "type": "GET",
            "dataType": "json",
            "success": function(json) {
                var goods = json.data;
                if (goods == null) {
                    location.href = "../index.html";
                    return;
                }

                $("#goods-title").html(goods.title);
                $("#goods-sell-point").html(goods.sellPoint);
                $("#goods-price").html(goods.price);

                $("#big_img").attr("src", ".." + goods.image);
            },
            "error": function() {
                location.href = "index.html";
            }
        });
    }

    // 处理“添加到购物车”
    $("#btn-add-to-cart").click(function() {
        var url = "../cart/add_to_cart";
        var gid = id;
        var price = $("#goods-price").html();
        var count = $("#num").val();
        var data = "gid=" + gid + "&price=" + price + "&count=" + count; // gid=xx&price=xx&count=xx
        console.log("[data] " + data);
        $.ajax({
            "url": url,
            "data": data,
            "type": "POST",
            "dataType": "json",
            "success": function(json) {
                if (json.state == 200) {
                    alert("添加成功！ ");
                } else {
                    alert("添加失败！" + json.message);
                }
            },
            "error": function() {
                alert("您的登录信息已经过期！请重新登录！");
                location.href = "login.html";
            }
        });
    });
</script>
</body>

</html>



